package com.xbongbong.paas.pojo.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.xbongbong.paas.toolbox.wrap.BaseVO;
import com.xbongbong.saas.domain.entity.CallCenterTeamEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author youli.chen
 * @version v1.0
 * @description: 度言团队VO
 * @date 2019/2/14 10:06
 * @since v1.0
 */
@Setter
@Getter
@ToString
public class DuYanTeamVO extends BaseVO {

    public DuYanTeamVO() {

    }

    public DuYanTeamVO(CallCenterTeamEntity syncedTeam) {
        this.id = Long.parseLong(syncedTeam.getTeamId());
        this.teamId = this.id;
        this.name = syncedTeam.getName();
        this.orgId = Long.parseLong(syncedTeam.getOrgId());
        this.phoneVisibility = syncedTeam.getPhoneVisibility();
        this.parentId = Long.parseLong(syncedTeam.getParentId());
        this.remark = syncedTeam.getRemark();
    }

    public DuYanTeamVO(String name, String phoneVisibility) {
        this.name = name;
        this.phoneVisibility = phoneVisibility;
    }

    /**
     * 团队编号
     * 团队列表API 返回
     */
    private Long id;
    /**
     * 团队编号
     * 新建团队API 返回
     */
    @JSONField(name = "team_id")
    private Long teamId;
    /**
     * 团队名字
     */
    private String name;
    /**
     * 所属企业编号
     */
    @JSONField(name = "org_id")
    private Long orgId;
    /**
     * 号码是否对团队成员隐藏:PUBLIC:公开,PRIVATE:隐藏,MEMBER_PRIVATE:对团队管理员公开,普通坐席隐藏
     */
    @JSONField(name = "phone_visibility")
    private String phoneVisibility;
    /**
     * 如果当前团队是团队A的子团队,传团队A的team_id。ps:团队架构最多支持3层
     */
    @JSONField(name = "parent_id")
    private Long parentId;
    /**
     * 团队是否有线路
     */
    @JSONField(name = "phoneline")
    private Boolean phoneLine;
    /**
     * 团队备注
     */
    private String remark;
}
